﻿using System;
using Ext.Net.MVC;
using Sharp.Infrastructure;
using Sharp.Platform;
using Sharp.Platform.Interface;
using Sharp.Platform.List;
using Sharp.Platform.Other;
using Column = Ext.Net.MVC.ColumnAttribute;

namespace Sharp.Web.Models
{
    /// <summary>
    /// 组织结构
    /// </summary>
    [Platform.Title("组织结构管理")]
    [DataHandler(ModuleOP.Details, "浏览", 0)]
    [DataHandler(ModuleOP.Create, "新增", 1)]
    [DataHandler(ModuleOP.Edit, "修改", 2)]
    [DataHandler(ModuleOP.Delete, "删除", 3)]
    public partial class OrgIndexModel : IViewModel
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        /// <value>主键Id</value>
        [Column(Hidden = true)]
        public Guid Id { get; set; }
        /// <summary>
        /// 名称
        /// </summary> 
        [TreeColumn(Width = 100, Text = "名称", ToolTip = "OrgPath")]
        public string Title { get; set; }
        /// <summary>
        /// 编码
        /// </summary>
        [Column(Width = 100, Text = "编码", DataIndex = "code")]
        public string Code { get; set; }
        /// <summary>
        /// Route
        /// </summary>
        [Column(Width = 100, Text = "Route")]
        public string Route { get; set; }

        /// <summary>
        /// 简称
        /// </summary>
        [Column(Width = 100, Text = "简称")]
        public string Abbreviation { get; set; }

        /// <summary>
        /// 编制
        /// </summary>
        [NumberColumn(Width = 100, Text = "编制", DataIndex = "maxHeadcount")]
        public int? MaxHeadcount { get; set; }

        /// <summary>
        /// 当前编制
        /// </summary>
        [NumberColumn(Width = 100, Text = "当前编制", DataIndex = "currentHeadcount")]
        public int? CurrentHeadcount { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        /// <value>备注</value>
        [Column(Width = 100, Text = "备注", DataIndex = "remark")]
        public string Remark { get; set; }

        /// <summary>
        /// 组织路径
        /// </summary>
        [Column(Width = 260, Text = "组织", DataIndex = "orgPath")]
        public string OrgPath { get; set; }


    }

    public partial class OrgIndexModel : SharpTreeList
    {
        public OrgIndexModel()
        {
            this.Feature = ListFeature.MultiSelect | ListFeature.Paging | ListFeature.RowNumber;
        }



    }
}